#!/usr/bin/env python
# -*- coding: utf-8 -*-
from sqlalchemy import create_engine
from db import Session
from db.data_loader import *
if __name__ == '__main__':
    engine = create_engine('sqlite:///test.sqlite3', echo=False)
    Session.configure(bind=engine)
    session = Session()

    dataPath = './tests/samples'
    Loader12306().load(session, dataPath + '/12306cn.txt', append=True)
    LoaderWangYi().load(session, dataPath + '/wangyi_100w.txt', append=True)
    LoaderMao().load(session, dataPath + '/mao_1000w.txt', append=True)
    LoaderShengDa().load(session, dataPath + '/shengda_1000w.txt', append=True)
    Loader178com().load(session, dataPath + '/178com_1000w.txt', append=True)
    LoaderCSDN().load(session, dataPath + '/csdn_600w.txt', append=True)
    LoaderDuoWan().load(session, dataPath + '/duowan_800w.txt', append=True)
    Loader7k7k().load(session, dataPath+ '/7k7k_2000w.txt', append=True)
    LoaderDuDuNiu().load(session, dataPath + '/duduniu.txt', append=True)
    Loader17173com().load(session, dataPath + '/17173com.txt', append=True)
    LoaderTianYa().load(session, dataPath + '/tianya_4000w.txt', append=True)
    Loader163com().load(session, dataPath + '/163com.txt', append=True)
    Loader163mail().load(session, dataPath + '/163mail.txt', append=True)
